package com.ruicar.afs.cloud.basic.api.fegin.repayment;

import com.ruicar.afs.cloud.basic.api.dto.RepaymentPlanDTO;
import com.ruicar.afs.cloud.common.core.util.IResponse;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author: Lee
 * @date: 2020/5/11 19:39
 * @description: 还款计划内部调用fegin接口
 */
@FeignClient(value = "${com.ruicar.service-names.basic-server}",contextId = "repayment-plan-fegin")
public interface RepaymentPlanFegin {

    @ApiOperation("根据合同号码查询还款计划表数据")
    @PostMapping(value = "repaymentPlanInfo/getRepaymentPlanInfoList")
    IResponse<List<RepaymentPlanDTO>> findByContractNo(@RequestParam("contractNo") String contractNo);

    @ApiOperation("更新还款计划表日期")
    @PostMapping(value = "repaymentPlanInfo/updateRepaymentPlan")
    IResponse<Boolean> updateRepaymentPlan(@RequestParam("contractNo") String contractNo,@RequestParam("dueDate") Date dueDate,@RequestParam("costAmt") BigDecimal costAmt);

}
